<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>${fns:getConfig('productName')}</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />   
    <link rel="shortcut icon" href="${ctxStatic}/images/favicon.ico"  sizes="32x32" />
    
   
    <script src="${ctxStatic}/jquery/jquery-1.12.4.min.js"></script> 
	<link href="${ctxStatic}/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<link href="${ctxStatic}/bootstrap/3.3.6/css_hplus/css/font-awesome.min.css" rel="stylesheet">
	<link href="${ctxStatic}/bootstrap/3.3.6/css_hplus/css/animate.min.css" rel="stylesheet">
	<link href="${ctxStatic}/bootstrap/3.3.6/css_hplus/css/style.min.css" rel="stylesheet">
	<link href="${ctxStatic}/bootstrap/3.3.6/plugins/context/context.bootstrap.css" rel="stylesheet"/>
	
	<script src="${ctxStatic}/bootstrap/3.3.6/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${ctxStatic}/bootstrap/3.3.6/plugins/context/context.js"></script>
	<script src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/plugins/hover_dropdown/hover-dropdown.min.js"></script>
	<script src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	
	<script src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/hplus.min.js"></script>
    <script type="text/javascript" src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/contabs.js"></script>
    <script src="${ctxStatic}/bootstrap/3.3.6/css_hplus/js/plugins/pace/pace.min.js"></script>
    
	<script src="${ctxStatic}/layer/3.0.1/layer.js" type="text/javascript"></script>
	<link href="${ctxStatic}/layer/3.0.1/skin/default/layer.css" type="text/css" rel="stylesheet" />

	<script src="${ctxStatic}/common/minglead.js" type="text/javascript"></script>
	<link href="${ctxStatic}/common/sysIndex.css" type="text/css" rel="stylesheet"/>
	
	<script type="text/javascript">
		$(function(){
			var indexWidth=$(window).width();
			var indexHeight=$(window).height();
			if(indexWidth<1300){
				$('body').addClass('mini-navbar');
				$('.sidebar-minin-btn').find('i').attr('class','fa fa-indent');
				$('.sidebar-minin-btn').find('i').attr('title','打开侧边栏');
				menuHover(true);
			}
			$("#customMenu a.menu").click(function(){
				var menuId = "menu-" + $(this).attr("data-id");
				$('.menulist').hide()
				$('.'+menuId).show();
				$('#customMenu a.menu').removeClass('menu-visited');
				$(this).toggleClass('menu-visited');
				return false;
			});
			$('.sidebar-minin-btn').on('click',function(){
				var icon_i=$(this).find('i');
				var title_='关闭侧边栏';
				if(icon_i.hasClass('fa fa-outdent')){
					icon_i.attr('class','fa fa-indent');
					title_='打开侧边栏';
					$("#side-menu .menulist").siblings().removeClass("active").children("ul.in").collapse("hide");
					$("#side-menu .nav-second-level li").siblings().removeClass("active").children("ul.in").collapse("hide"); 
					menuHover(true);
				}else{
					icon_i.attr('class','fa fa-outdent');
					menuHover(false);
				}
				$(this).attr('title',title_);
			});
			
/* 			var firstTopMenu = $(".menu-visited");
			firstTopMenu.click(); */
			
			
			/* 首页高度ie8 */
			if(isIE8()){
				var defaultHeight=$(document).height();
				height = defaultHeight*0.70;		
                $('#iframeAuto').height(height);
			}
									
		});
		function menuHover(isBind){
			if(isBind){
				$('#side-menu .menulist').hover(function(){
					$(this).find('.nav-second-level').show();
				},function(){
					$(this).find('.nav-second-level').hide();
				});
				$('#side-menu .nav-second-level li').hover(function(){
					$(this).find('.nav-third-level').show();
				},function(){
					$(this).find('.nav-third-level').hide();
				});
				/* $('#side-menu .nav-second-level .J_menuItem').on('click',function(){
					$('#side-menu .nav-second-level').hide();
				}) */
			}else{
				$('#side-menu .nav-third-level').removeAttr('style');
				$('#side-menu .nav-second-level').attr('style','height:0');
				$('#side-menu .menulist').off('mouseenter').off('mouseleave');
				$('#side-menu .nav-second-level li').off('mouseenter').off('mouseleave');
				//$('#side-menu .nav-second-level .J_menuItem').off('click');
			}
		}
	</script>
</head>

<body class="fixed-sidebar full-height-layout gray-bg pace-done" style="overflow:hidden;min-width: 1000px;">

  	<c:set var="defaultUrl" value="${ctxAdmin}/sys/desktop/index"/>
  	<c:set var="indexUrl" value=""/>
    <div id="wrapper"> 
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
            	<div class="sidebar-minin-btn navbar-minimalize" title="关闭侧边栏"><a class=""><i class="fa fa-outdent">&nbsp;</i></a></div>                
                <ul class="nav" id="side-menu">
                	<li style="height: 1px">&nbsp;</li>
                 	<c:set var="menuList" value="${fns:getMenuList()}" />
                 	<c:set var="firstMenu" value="true" />
                 	<c:forEach items="${fns:getMenuList()}" var="mainMenu" varStatus="idxStatus">
						<c:if test="${mainMenu.isShow eq '1'}">
							<c:forEach items="${menuList}" var="menu" varStatus="idxStatus">
								<c:if test="${menu.parent.id eq mainMenu.id&&menu.isShow eq '1'}">
									<c:choose>
										<c:when test="${not empty menu.href}">
										<li class="menulist menu-${menu.parent.id} ${firstMenu?'':'menu-hide'}">
											<a class="J_menuItem" ${firstMenu?'target="mainFrame"':''} data-index="${idxStatus.index}" href="${fn:indexOf(menu.href, '://') eq -1 ? ctxAdmin : ''}${not empty menu.href ? menu.href : '/404'}">
												<i class="${not empty menu.icon? menu.icon:'circle'}"></i>
												<span class="nav-label">${menu.name}</span>
											</a>
										</li>
										</c:when>
										<c:otherwise>
										<li class="menulist menu-${menu.parent.id} ${firstMenu?'':'menu-hide'}">
											<a href="#">
												<i class="${not empty menu.icon? menu.icon:'circle'}"></i>
												<span class="nav-label nav-label-right">${menu.name}</span>
												<span class="fa arrow nav-menulist-arrow"></span>
											</a>
											<ul class="nav nav-second-level collapse" aria-expanded="false" style="height: 0px;">
												<c:forEach items="${menuList}" var="menu2" varStatus="">
													<c:if test="${menu2.parent.id eq menu.id&&menu2.isShow eq '1'}">
														<c:choose>
															<c:when test="${not empty menu2.href}">
															<li>
																<a ${firstMenu?'target="mainFrame"':''} class="J_menuItem"
																href="${fn:indexOf(menu2.href, '://') eq -1 ? ctxAdmin : ''}${not empty menu2.href ? menu2.href : '/404'}">
																	<c:if test="${not empty menu2.icon}">
																	<i class="${menu2.icon}"></i>
																	</c:if>
																	<span class="nav-label">${menu2.name}</span>
																</a>
															</li>	
															</c:when>
															<c:otherwise>
															<li>
																<a href="#">
																	<c:if test="${not empty menu2.icon}">
																	<i class="${menu2.icon}"></i>
																	</c:if>
																	<span class="nav-label">${menu2.name}</span>
																	<span class="fa arrow"></span>
																</a>
																<ul class="nav nav-third-level collapse">
																	<c:forEach items="${menuList}" var="menu3">
																		<c:if test="${menu3.parent.id eq menu2.id&&menu3.isShow eq '1'}">
																		<li>																																																				
																		<a ${firstMenu?'target="mainFrame"':''} class="J_menuItem" href="${fn:indexOf(menu3.href, '://') eq -1 ? ctxAdmin : ''}${not empty menu3.href ? menu3.href : '/404'}">
																		<i class="${menu3.icon}"></i>
																		<span class="nav-label">${menu3.name}</span>
																																				
																		</a>
																		</li>
																		</c:if>
																	</c:forEach>
																</ul>
															</li>
															</c:otherwise>
														</c:choose>
													</c:if>
												</c:forEach>
											</ul>
										</li>
										</c:otherwise>
									</c:choose>
								</c:if>
							</c:forEach>
							<c:set var="firstMenu" value="false" />
						</c:if>
					</c:forEach>
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        
        
        
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
        <!-- 左侧顶部导航条开始 -->
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                    <div class="logo">
                    	<img alt="" src="${ctxStatic}/images/logox64.png">
                    	<span>${fns:getConfig('productName')}</span>
                    </div>

                    </div>
                    <ul class="nav navbar-top-links navbar-right" id="customMenu" style="display: inline-block;float: right;">
                        
                        <!-- 业务菜单 -->
<%--                         <c:set var="firstMenu" value="true"/>                                           
						<c:forEach items="${fns:getMenuList0()}" var="menu" varStatus="idxStatus">
							
								<li class="">
									<c:if test="${empty menu.href}">
										<a class="menu ${not empty firstMenu && firstMenu ? 'menu-visited':''}" href="javascript:" data-href="${ctxAdmin}/sys/menu/tree?parentId=${menu.id}" title="${menu.name}" data-id="${menu.id}"><span><i class="${ menu.icon}"></i>${menu.name}</span></a>
									</c:if>
									<c:if test="${not empty menu.href}">
										<a class="menu" href="${fn:indexOf(menu.href, '://') eq -1 ? ctxAdmin : ''}${menu.href}" data-id="${menu.id}" target="mainFrame"><span>${menu.name}</span></a>
									</c:if>
								</li>
								
								<c:if test="${firstMenu}">
									<c:set var="firstMenuId" value="${menu.id}"/>
								</c:if>
								<c:set var="firstMenu" value="false"/>					
						</c:forEach> --%>
						
									
						<!-- 系统内置菜单 -->
						<li class="dropdown">
							<a class="dropdown-toggle count-info" href="#" data-hover="dropdown" data-toggle="dropdown">
								<span class="text-xs block">${fns:getUser().name}<b class="caret"></b></span>
							</a>
							<ul class="dropdown-menu">
<%-- 								<li><a href="${ctxAdmin}/sys/user/info" class="J_menuItem" data-id="${ctxAdmin}/sys/user/info" ><i class="glyphicon glyphicon-user"></i>&nbsp; 个人信息</a></li>
								<li><a href="${ctxAdmin}/sys/user/modifyPwd" class="J_menuItem"  data-id="${ctxAdmin}/sys/user/modifyPwd" ><i class="glyphicon glyphicon-lock"></i>&nbsp;  修改密码</a></li>
 --%>
							    <%-- <li><a href="${ctxAdmin}/logout" title="退出登录"><i class="fa fa-sign-out"></i>退出</a></li> --%>
							</ul>
						</li>

                        <li><a href="${ctxAdmin}/logout" title="退出登录"><i class="fa fa-sign-out"></i>退出</a></li>
                    </ul>
                </nav>
            </div>
            <!-- 左侧顶部导航条结束-->
            <!-- 左侧tab切换条开始-->
            <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i></button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content">
                        <a href="javascript:;" class="active J_menuTab" data-id="${defaultUrl==''?indexUrl:defaultUrl }">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
                </button>
                <!-- div class="btn-group roll-nav roll-right">
                    <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作 <span class="caret"></span>

                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right" >
                        <li class="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                        <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div> -->
            </div>
            <!-- 左侧tab切换条结束-->
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" id="iframeAuto" name="iframeMain" width="100%" height="100%" src="${defaultUrl==''?indexUrl:defaultUrl}" frameborder="0" data-id="${defaultUrl==''?indexUrl:defaultUrl }" seamless></iframe>
            </div>
            <div class="footer">
                <div style="text-align: center;">
                	 © 版权所有${fns:getConfig('copyrightYear')} ${fns:getConfig('productName')} 技术支持 - ${fns:getConfig('technicalSupport')}
                </div>
            </div>
        </div>
        <!--右侧部分结束-->
    </div>     
</body>
</html>